<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../00_static/js/vue.js" type="text/javascript"></script>
    <title>过渡案例_原生实现</title>
    <style>
        .picture {
            width: 100px;
        }

        .slide-fade-enter-active {
            transition: all .3s ease;
        }

        .slide-fade-leave-active {
            transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
        }

        .slide-fade-enter,
        .slide-fade-leave-to

        /* .slide-fade-leave-active for below version 2.1.8 */
            {
            transform: translateX(10px);
            opacity: 0;
        }
    </style>
</head>

<body>
    <div id="app">
        <button id="btn" @click="isShow = !isShow">切换</button><br>
        <transition name="slide-fade">
            <img v-show="isShow" class="picture" src="../00_static/img/冷.jpeg" alt="">
        </transition>
    </div>

    <script type="text/javascript">
        new Vue({
            el: '#app',
            data: {
                isShow: true,
            },
        })
    </script>
</body>

</html>